<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<link rel="stylesheet" href="/site_media/css/profile/style.css" type="text/css" />

{% extends "base.html" %}
{% block title %}{{ user_public.username }}{% endblock %}
{% block content %}
	<div id="container">
		<ul><li class="profile_taskbar">
			<div align="center">My Current Profile Image</div>
			<div align="center" style="margin-top: 20px">
				<p><a href="/user/{{ user.username }}/"><img src="{{ media_url }}" /></a></p>
			</div>
			<form action="" enctype="multipart/form-data" method="post">
				{% csrf_token %}
				<p>{{ form.as_p }}</p>
				<input type="submit" value="Submit" />
			</form>
		</li>
		</ul>
		<div align="center" style="border-bottom: thin solid #DDDDDD"> My Profile Images </div>
			{% if user.profileimage_set.all %}
				<p align="center"> Choose the picture you would like to use as your main profile picture. </p>
				<ul>
					{% for img in user.profileimage_set.all %}
						<li href="/" class="im">
							<im class="im_left">
								<a href="/user/{{ user.username }}/profilepic/{{img.pk}}/c"><img src="{{img.thumbnail.url}}"/></a>
							</im>
							<im class="im_right">
								<a href="/user/{{ user.username }}/profilepic/{{img.pk}}/d">[x]</a>
							</im>
						</li>
					{% endfor %}
				</ul>
			{% else %}
				<p>{{ user.username }} hasn't posted any photos yet.</p>
			{% endif %}
	</div>
{% endblock %}


<!--
	<div id="container">
		<div id="im_r">
			<div align="center" style="margin-top: 20px">{{user.username}}'s Profile Images</div>
			<div id="im_r_inner">
				<div align="center"><img src="{{media_url}}" /></div>
				<form action="" enctype="multipart/form-data" method="post">
					{% csrf_token %}
					<p>{{ form.as_p }}</p>
					<input type="submit" value="Submit" />
				</form>
			</div>
		</div>
		<div align="center" style="border-bottom: thin solid #DDDDDD"></div>
		<div id="im_l">
			{% if user.profileimage_set.all %}
				Profile Photos
				<p> Choose the picture you would like to use as your main profile picture. </p>
				<ol>
					{% for img in user.profileimage_set.all %}
						<li><a href="/user/{{ user.username }}/profilepic/{{img.pk}}/c"><img src="{{ img.thumbnail.url }}" /></a> <a href="/user/{{ user.username }}/profilepic/{{img.pk}}/d"> [Delete] </a></li>
					{% endfor %}
				</ol>
			{% else %}
				<p>{{ user.username }} hasn't posted any photos yet.</p>
			{% endif %}
		</div>
	</div>-->